package com.sakura.takeaway.filter;


/**
 * 自定义需求
 * @author Sakura
 * @Date 2022-07-14 15:42
 */
/*
@Slf4j
@WebFilter(filterName = "LogFilter",urlPatterns = "/*")
public class LogFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletRequest request =(HttpServletRequest) servletRequest;
        HttpServletResponse response =(HttpServletResponse) servletResponse;

        String requestURI = request.getRequestURI();
        Long empId = (Long) request.getSession().getAttribute("employee");

        log.info("获取到请求，{}",requestURI);
        log.info("员工id,{}",empId);

        filterChain.doFilter(request,response);
    }
}
 */
